What is the meaning of the word "trench warfare"?

Definitions:

  1. a struggle, usually prolonged, between competing entities in which neither side is able to win copy to clipboard noun
    • The two companies had engaged in years of trench warfare, but neither one ever came out on top for very long. copy to clipboard
  2. a type of armed combat in which the opposing troops fight from trenches that face each other copy to clipboard noun
    • instead of the war ending quickly, it became bogged down in trench warfare copy to clipboard